Skip to content

feat(rotocol): proposal 0014 - raiko2 v0.2 zk digests#21716

Open
smtmfft wants to merge 9 commits into
mainfrom
feat/protocol-proposal-0014-raiko2-v0.2-digests
Open

feat(rotocol): proposal 0014 - raiko2 v0.2 zk digests#21716
smtmfft wants to merge 9 commits into
mainfrom
feat/protocol-proposal-0014-raiko2-v0.2-digests

Conversation

@smtmfft

@smtmfft smtmfft commented May 22, 2026

Copy link
Copy Markdown
Contributor

No description provided.

smtmfft and others added 2 commits May 22, 2026 13:29
Register RISC0 and SP1 guest IDs from taikoxyz/raiko2 v0.2.0 on Shasta-only
mainnet verifiers (additive DAO actions; no L2 or SGX changes).

Co-authored-by: Cursor <cursoragent@cursor.com>
Document tag-scoped raiko2 reproduction, normative digest YAML, and gates
for reviewers and automation before DAO approval.

Co-authored-by: Cursor <cursoragent@cursor.com>
@smtmfft smtmfft changed the title Feat/protocol proposal 0014 raiko2 v0.2 digests feat(rotocol): proposal 0014 - raiko2 v0.2 zk digests May 22, 2026
@github-actions

github-actions Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🐋 DeepSeek Code Review

🔴 Critical Issues

No critical code defects found. However, the proposal’s entire security rests on the accuracy of the 12 bytes32 constants and the SP1_SHASTA_VERIFIER address. Any error will permanently enable the wrong ZK proofs or remove legitimate ones, potentially causing chain halts or proof invalidation. This is a governance-action risk, not a code bug, but it must be explicitly called out.

🟡 Warnings

  1. Constant values must be independently verified.
    The four ENABLE digests must match a reproducible build of raiko2 v0.2.0 exactly. The eight DISABLE digests must match the historical registrations from Proposal0009 and Proposal0010. A single wrong bytes32 will break ZK acceptance for the new version or accidentally re‑enable a legacy program. The review cannot confirm these values without building raiko2, so a second technical reviewer must validate them against the release artifacts.

  2. Calldata accuracy (Proposal0014.action.md).
    The high‑entropy calldata was checked in but not regenerated on‑chain by this review. If it was hand‑edited or generated from a different version of Proposal0014.s.sol, the DAO transaction will not execute the intended actions. Run P=0014 pnpm proposal and commit the output immediately before the governance vote.

  3. SetProgramTrusted access control assumption.
    The proposal calls SP1Verifier.setProgramTrusted via the DAO Controller. It assumes the DAO Controller has the necessary permission (owner or authorized role). If the SP1 verifier’s ownership is not assigned to the controller, the entire bundle will revert. Verify on‑chain that SP1_SHASTA_VERIFIER.owner() equals the DAO Controller address used in the proposal.

🔵 Suggestions

  • Constant naming inconsistency.
    SP1_PROPOSAL_VKEY_BN256 and similar use “BN256”, but the release page labels the same value as “vk_bn254”. The discrepancy is cosmetic but may cause confusion during audits. Consider aligning the suffix with BN254.

  • Add a simple static check.
    Inside a test (or the BuildProposal dry‑run) decode the generated calldata and assert that the actions array matches the constants defined in the solidity file. This would catch any mismatch before submission.

  • Clarify verbatim: The spec file says “(Proposal0014.s.sol L1 ZK actions 4–9)” for Proposal0009, but the actual actions are indices 4–7 in the disable block (Proposal0009 had 4 SP1 actions). The comment could be sharper to avoid confusion.

🟢 What Looks Good

  • Atomic enable‑before‑disable ordering: all 12 actions execute in one DAO Execute call, with new keys trusted before the old ones are removed. This leaves no window where both sets are untrusted.
  • Clean separation of concerns: only SP1 verifier is touched, no RISC0 or SGX attestations are altered. Constants are clearly marked and sourced.
  • Documentation is thorough: the spec includes canonical release links, YAML‑style digests, verification gates, and post‑execution cast commands for on‑chain sanity checks.

Automatically triggered on PR update • model: deepseek-v4-pro

smtmfft and others added 7 commits May 22, 2026 07:50
…verifier digests only

DISABLE targets only Shasta RISC0/SP1 verifier proxies; SGX MR_ENCLAVE untouched.
Proposal0014.action.md regenerated with P=0014 pnpm proposal (parity verified).

Co-authored-by: Cursor <cursoragent@cursor.com>
Use "enables"/"disables" instead of abbreviated ENABLEs/DISABLEs to avoid
spell-check false positives while keeping the same meaning.

Co-authored-by: Cursor <cursoragent@cursor.com>

@ggonzalez94 ggonzalez94 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants